<%--
  Created by IntelliJ IDEA.
  User: SongTiantian
  Date: 2020/12/9
  Time: 22:49
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div>
    <%--如果用户还没有登录，显示     【登录 和注册的菜单】 --%>
    <c:if test="${ sessionScope.user == null  }">
        <li style="float:right;text-decoration: none;"><a href="login.jsp" style="color:black;">登录</a>  &nbsp;&nbsp;</li>
        <li style="float:right;text-decoration: none;"><a href="regist.jsp" style="color:black;">注册</a> &nbsp;&nbsp</li>
    </c:if>
<%--    如果已经登录，则显示 登录 成功之后的用户信息。--%>
    <c:if test="${ sessionScope.user.type == 0}">
        <li style="float:right;text-decoration: none;"><a style=" color:black;" href="userServlet?action=logout" >注销</a>   &nbsp;</li>
    </c:if>
    <c:if test="${sessionScope.user.type == 1}">
        <li style="float:right;text-decoration: none; "><a href="manage/playServlet?action=page" style="color:black;">后台管理</a> &nbsp; </li>
        <li style="float:right;text-decoration: none; "><a style="color:black;" href="userServlet?action=logout">注销</a>   &nbsp;</li>
    </c:if>

</div>

